package com.example.jurisdiction.Service.impl;

import com.example.jurisdiction.Mapper.roleMapper;
import com.example.jurisdiction.Service.roleService;
import entity.role;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class roleServiceimpl implements roleService {
    @Autowired
    private roleMapper role;

    @Override
    public List<role> getRole() throws Exception {
        // TODO Auto-generated method stub
        return this.role.getRole();
    }

    @Override
    public int addRole(role r) throws Exception {
        // TODO Auto-generated method stub
        return this.role.addRole(r);
    }

    @Override
    public int updateRole(role r) throws Exception {
        // TODO Auto-generated method stub
        return this.role.updateRole(r);
    }

    @Override
    public int delRole(int id) throws Exception {
        // TODO Auto-generated method stub
        return this.role.delRole(id);
    }

    @Override
    public role getRoles(int id) throws Exception {
        // TODO Auto-generated method stub
        return this.role.getRoles(id);
    }
}
